package org.kernely.scheduling;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.http.HttpService;

public class Activator implements BundleActivator {

	/**
	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
	 */
	public void start(BundleContext context) throws Exception {
		// Register images
		ServiceReference sRef = context.getServiceReference(HttpService.class.getName());
		if (sRef != null)
		{
			HttpService service = (HttpService) context.getService(sRef);
			service.registerResources("/schedulingbundle/images", "images", null);
		}
	}

	/**
	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
	 */
	public void stop(BundleContext context) throws Exception {
	}

}
